{% extends 'trp/base.html'%}
{% block content %}
<!-- 用户管理——管理员 -->
<input type="hidden" name="org_id" value="{{organization.id}}"/>
<input type="hidden" name="charge_seq" value="{{charge_seq}}"/>

<div class="pageheader">
	<!-- <ol class="breadcrumb" style="background:#fff;">
		<li><span>组织名称：{{organization.name}}</span></li>
	  	<li><span>当前余额：</span><span class="balance">{{organization.balance|floatformat:"-2"}}</span></li>
	</ol> -->
	<ol class="breadcrumb" style="background:#fff;position:fixed;top:10px;left:190px;z-index:1031;">
		<li><span>组织名称：{{organization.name}}</span></li>
	  	<li><span class="label label-success">当前余额</span>&nbsp;&nbsp;站内：<span class="in_balance red"><!-- {{organization.in_balance|floatformat:"-2"}} -->-</span>&nbsp;&nbsp;站外：<span class="out_balance red"><!-- {{organization.out_balance|floatformat:"-2"}} -->-</span>&nbsp;&nbsp;联盟：<span class="ally_balance red"><!-- {{organization.ally_balance|floatformat:"-2"}} -->-</span></li>
	</ol>
	<a class="btn-create" id="btn-createuser" href="javascript:;"><span class="glyphicon glyphicon-plus"></span>新增用户</a>
	{% ifnotequal organization.type 0 %}
	<a class="btn-create" id="btn-recharge" href="javascript:;" style="margin:0 0 0 40px"><span class="glyphicon glyphicon-usd"></span>充值</a>
	<a class="btn-create" id="btn-chargelist" href="javascript:;" style="margin:0 0 0 40px"><span class="glyphicon glyphicon-eye-open"></span>充值记录</a>
	{% endifnotequal %}
	<div class="searchbox pull-right">
        <label>搜索<input id="term" class="searchbox-ipt" placeholder="按名称模糊搜索" type="text"></label>
        <a class="searchbox-btn" href="javascript:;"></a>
    </div>
</div>
<div class="pagebox">
	<table id="userList" class="grid" width="100%">
	    <thead>
	        <tr>
	            <th>账号</th>
	            <th>手机号码</th>
	            <th>邮箱</th>
	            <th>描述</th>
	            <th minwidth="100">操作</th>
	        </tr>
	    </thead>
	    <tbody>
	    	<tr><td colspan="5" class="loading">&nbsp;</td></tr>
	    </tbody>
	</table>
</div>
<div class="pop-form form-group pop-inofedit" style="display:none;">
	<form class="infoForm">
		<div class="form_item">
			<label class="form_label">账户名称：</label>
			<div class="form_ctrl">
				<input type="text" name="name" class="form-control" placeholder="请填写名称..." readonly/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">手机号码：</label>
			<div class="form_ctrl">
				<input type="text" name="phone" class="form-control phone" placeholder="请填写手机号码..."/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">邮箱：</label>
			<div class="form_ctrl">
				<input type="text" name="email" class="form-control email" placeholder="请填写邮箱..."/>
			</div>
		</div>
		<div class="form_item" style="height:auto;">
			<label class="form_label">描述：</label>
			<div class="form_ctrl">
				<textarea type="text" name="description" class="form-control" placeholder="请填写描述..." style="height:100px;"></textarea>
			</div>
		</div>
	</form>
</div>
<div class="pop-form form-group pop-resetpwd" style="display:none;">
	<form class="resetForm required-validate">
		<div class="form_item">
			<label class="form_label">新密码：</label>
			<div class="form_ctrl">
				<input type="password" name="password" class="form-control required password" placeholder="请填写新密码..."/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">确认新密码：</label>
			<div class="form_ctrl">
				<input type="password" name="password_confirm" class="form-control required {equalTo:'.resetpwd'}" placeholder="请确认新密码..."/>
			</div>
		</div>
	</form>
</div>

<div class="pop-form form-group pop-recharge" style="display:none;">
	<form class="infoForm">
		<div class="form_item hasunit">
			<label class="form_label">站内充值金额：</label>
			<div class="form_ctrl">
				<input type="text" name="in_balance" class="form-control" placeholder="请填写金额..." style="float:left;width:227px;"/>
			</div>
		</div>
		<div class="form_item hasunit">
			<label class="form_label">站外充值金额：</label>
			<div class="form_ctrl">
				<input type="text" name="out_balance" class="form-control" placeholder="请填写金额..." style="float:left;width:227px;"/>
			</div>
		</div>
		<div class="form_item hasunit">
			<label class="form_label">联盟充值金额：</label>
			<div class="form_ctrl">
				<input type="text" name="ally_balance" class="form-control" placeholder="请填写金额..." style="float:left;width:227px;"/>
			</div>
		</div>
	</form>
</div>

<div class="pop-form pagebox pop-chargelist" style="display:none;">
	<table class="grid" width="100%">
	    <thead>
	        <tr>
	            <th>组织名称</th>
	            <th>充值日期</th>
	            <th>站内充值金额</th>
	            <th>站外充值金额</th>
	            <th>联盟充值金额</th>
	            <th>充值员</th>
	        </tr>
	    </thead>
	    <tbody>
	    	<tr><td colspan="6" class="loading">&nbsp;</td></tr>
	    </tbody>
	</table>
</div>

<div class=" pop-form form-group pop-createuser" style="display:none;">
	<form class="infoForm">
		<div class="form_item">
			<label class="form_label">用户名：</label>
			<div class="form_ctrl">
				<input type="text" name="username" class="form-control required" placeholder="请填写名称..." style="width:227px;"/>
				<!-- <input type="text" name="username" class="form-control required" placeholder="请填写名称..." style="width:227px;"/> -->
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">密码：</label>
			<div class="form_ctrl">
				<input type="password" name="password" class="form-control required password" placeholder="请填写密码..." style="width:227px;"/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">确认密码：</label>
			<div class="form_ctrl">
				<input type="password" name="password_confirm" class="form-control required {equalTo:'.newpwd'}" placeholder="请填写密码..." style="width:227px;"/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">手机：</label>
			<div class="form_ctrl">
				<input type="text" name="phone" class="form-control phone" placeholder="请填写手机号码..." style="width:227px;"/>
			</div>
		</div>
		<div class="form_item">
			<label class="form_label">邮箱：</label>
			<div class="form_ctrl">
				<input type="text" name="email" class="form-control email" placeholder="请填写email..." style="width:227px;"/>
			</div>
		</div>
		{% ifequal organization.type 0 %}
		<div class="form_item">
			<label class="form_label">组织类型：</label>
			<div class="form_ctrl">
				<select name="type" style="width:227px;">
					<option value="1">运营人员</option>
					{% if user.account.is_admin%}
					<option value="2">管理员</option>
					{% endif %}
				</select>
			</div>
		</div>
		{% endifequal %}
		<div class="form_item" style="height:auto;">
			<label class="form_label">描述：</label>
			<div class="form_ctrl">
				<textarea type="text" name="description" class="form-control" placeholder="请填写描述..." style="float:left;width:227px;height:100px;"></textarea>
			</div>
		</div>
	</form>
</div>

<script>seajs.use('trp/js/user');</script>
{% endblock %}